package com.sparsearr.datastructures.itheima.twodimension;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/4/19 18:22
 * @Description: 二维数据组
 * @Version: 1.0
 */

public class TwoDimenSion {
    private static final Logger logger = LogManager.getLogger(TwoDimenSion.class);

    public static void main(String[] args) {
        int[][] arr = new int[][] {{1,2,3}, {4,5,6}, {7,8,9}};

        int[][] arr1 = {
                {1,2,3},
                {4,5,6},
                {7,8,9}
        };

        // arr1[0] = {1,2,3};
//        System.out.println(arr1[0][0]);
        // 输出二维数组
        for (int i = 0; i < arr1.length; i++) {
            for (int j = 0; j < arr1[i].length; j++) {
                System.out.print(arr1[i][j] + " ");
            }
            System.out.println();
        }
    }
}
